<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Modern Business - Start Bootstrap Template</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Add custom CSS here -->
    <link href="css/modern-business.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="css/egroupstyle.css" rel="stylesheet">

</head>

<body>

    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <!-- You'll want to use a responsive image option so this logo looks good on devices - I recommend using something like retina.js (do a quick Google search for it and you'll find it) -->
                <a class="navbar-brand" href="index.html">Egroup Team</a>
            </div>
            <div>
                <ul class="nav navbar-nav">
                    <li class="dropdown"><a href="about.html"><i class="fa fa-user"></i>&nbsp;Hi,Epartner <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">登出</a>
                            </li>
                            <li><a href="#">基本資管理</a>
                            </li>
                        </ul>
                    </li>
                </ul>  
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="bootstraptheme.html">colorfulTheme</a>
                    </li>

                     <li class="dropdown active">
                        <a href="news.html" class="dropdown-toggle" data-toggle="dropdown">內文管理 <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="news.html">消息管理</a>
                            </li>
                            <li><a href="newsDetail.html">消息編輯</a>
                            </li>
                            <li><a href="newssort.html">分類管理</a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="banner.html" class="dropdown-toggle" data-toggle="dropdown">介面管理 <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="banner.html">banner管理</a>
                            </li>
                            <li><a href="picture.html">輪播管理</a>
                            </li>
                            <li><a href="footer.html">頁尾管理</a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="search.html" class="dropdown-toggle" data-toggle="dropdown">更多頁面 <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="search.html">搜尋頁面</a>
                            </li>
                            <li><a href="block.html">方格頁面</a>
                            </li>
                            <li><a href="404.html">404</a>
                            </li>                            
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">多層頁面<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="sidebarleft.html">左連結頁</a>
                            </li>
                            <li><a href="cleanpage.html">上連結頁</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>


    <div class="container tablestyle">
        <div class="row">
            <div class="col-lg-12">
                <br/>
                <ol class="breadcrumb">
                    <li><a href="manageBlog">創業密技管理</a>
                    </li>
                    <li class="active">新增創業密技</li>
                </ol>
                <a class="btn btn-default btn-sm" href="manageBlog">
                  <span class="glyphicon glyphicon-chevron-left"></span> 回上頁
                </a>
                <br /><br />

        <div class="bs-docs-section">
        <div class="row">
          <div class="col-lg-12">
            <div class="well bs-component">
              <form class="form-horizontal" id="sendForm" method="post" action="insertBlog">
                <fieldset>
                  <legend>新增創業密技</legend>
                  <div class="form-group">
                      <label for="title" class="col-lg-2 control-label">標題</label>
                      <div class="col-lg-8">
                        <input type="text" class="form-control" name="title" id="title">       
                      </div>
                  </div>
                                         
                  <div class="form-group">
                    <label for="content" class="col-lg-2 control-label">內容</label>
                    <div class="col-lg-8">
                      <textarea class="ckeditor" id="content" name="content"></textarea>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-lg-10 col-lg-offset-2">
                    <hr>
                      <button type="submit" class="btn btn-warning">送出</button>
                    </div>
                  </div>

                </fieldset>
              </form>


            </div>
          </div>
        </div>
        </div><!-- bs-docs-section-->


        </div><!-- col-lg-12-->
        </div><!--row -->      
    </div><!--container -->   


    <div class="container">

        <hr>

        <footer>
            <div class="row">
                <div class="col-lg-12">
                    <p>Copyright &copy; Company 2013</p>
                </div>
            </div>
        </footer>

    </div>
    <!-- /.container -->

    <!-- JavaScript -->
    <script src="js/jquery-1.10.2.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="js/modern-business.js"></script>
    <script src="ckeditor/ckeditor.js"></script>
    <script src="../js/jquery.validate.js"></script>
    <script src="../js/messages_zh_TW.js"></script>
    <script src="../js/additional-methods.js"></script>

    <script type="text/javascript">
    $(function(){
    	
    	$('#sendForm').submit(function(){
            $('textarea.ckeditor').each(function () {
               var $textarea = $(this);
               $textarea.val(CKEDITOR.instances[$textarea.attr('name')].getData());
            });
        });
    	
    	$("#sendForm").validate({
    		rules:{
    			title:{
    				required:true,
    				maxlength:40
    			},
    			content:{
    				required:true    				
    			}
    		},
    		messages:{
    			title:{
    				required:"請輸入標題",
    				maxlength:"長度不能超過{0}"
    			},
    			content:{
    				required:"請輸入內容"  				
    			}
    		},
			ignore: ''
    	});
    });    

    </script>
</body>

</html>
